package com.github.interview.http;



/**
 * @author Stephen
 * @date 2020/6/15 15:19
 */
public class BusinessException extends Exception {
    private int status;
    private String errMessage;

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getErrMessage() {
        return errMessage;
    }

    public void setErrMessage(String errMessage) {
        this.errMessage = errMessage;
    }

    public BusinessException(int status, String errMessage) {
        super(errMessage);
        this.status = status;
        this.errMessage = errMessage;
    }

    public BusinessException(ExceptionEnum exceptionEnum) {
        super(exceptionEnum.getMessage());
        this.status = exceptionEnum.getStatue();
        this.errMessage = exceptionEnum.getMessage();
    }
}
